package threaddemo1;

/**
 * Created by L.jp
 * Description:
 * User: 86189
 * Date: 2022-08-06
 * Time: 17:38
 */
//实现线程的第一张方式，继承Thread类，重写run方法
public class Mythraead extends  Thread {
    @Override
    public void run() {
        for(int i=0;i<100;i++){
            //currentThread()获取当前线程对象
            System.out.println(Thread.currentThread()+"线程开启了"+i);
        }
    }
}

